 
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 
 <c:url value="/resources/jQuery/jquery-1.7.2.min.js" var="jquery"/>
<c:url value="/resources/jQuery/jquery-ui-1.8.21.custom.min.js" var="jqueryUI"/>
<c:url value="/resources/css/cupertino/jquery-ui-1.8.21.custom.css" var="jQueryCSS" />


<script type="text/javascript" src="${jquery}" ></script>
<script type="text/javascript" src="${jqueryUI}" ></script>
<link type="text/css" href="${jQueryCSS}" rel="Stylesheet" />

<script type="text/javascript">
	 $(document).ready(function(){
	 $( "#tabs" ).tabs({
		 event: "click",
		 collapsible: "true"
	 });
	 $( "#login").button();
 	 $("#login").click(function() {
 		$("#loginForm").dialog(
 				{
 		            title: "Login Form",                
 		            width: 400,
 		            height: 230,
 		            modal: true,
 		            resizable: false
 				});
 		$("#username").val('');
 		$("#password").val('');
 		return false;
 	 });
	 });
</script>
 
 <h2 style="margin-bottom: 0px;">Lacrosse League Manager</h2>
    <c:choose>
    <c:when test="${principal ne 'anonymous'}">
    <div style="display: inline; position: fixed; top: 1em; right: 1em;">Logged in as <a href="<c:url value='/contact/view.html?id=${principal.contactID}'/>">${principal.fullName}</a></div>
    <br />
    </c:when>
    <c:otherwise>
      <div id="login" style="display: inline; position: fixed; top: 1em; right: 1em;">Login!</div>
      <p>${message}</p>
    </c:otherwise>
    </c:choose>
    <div id="loginForm" style="display:none">
      <h3>Login with Username and Password</h3>
      <form name='f' action='<c:url value="/j_spring_security_check"/>' method='POST'>
        <table>
          <tr><td>User:</td><td><input id="username" type='text' name='j_username' value=''></td></tr>
          <tr><td>Password:</td><td><input id="password" type='password' name='j_password'/></td></tr>
          <tr><td colspan='2'><input name="submit" type="submit" value="Login"/></td></tr>
        </table>
      </form>
    </div>